<extend name="Public/List/Common"/>
<block name="pageHeader">
    <div class="bjui-pageHeader">
        <form id="pagerForm" data-toggle="ajaxsearch" action="__ACTION__" method="post">
            <input type="hidden" name="cate_id" value="{:I('cate_id')}"/>

            <label>关键词：</label>
            <input value="{$_REQUEST['key']}" name="key" class="form-control" size="15"/>
            <button type="submit" class="btn-default" data-icon="search">查询</button>

            <div class="pull-right">
                <a href="{:U('add', array('cate_id'=>I('cate_id'), model_id=>$model_id))}" class="btn btn-green" data-toggle="navtab" data-id="dialog-normal" data-mask="true" data-icon="plus" data-title="添加分类-文章">添加</a>
                <a href="{:U('paste', array('cate_id'=>I('cate_id')))}" class="btn btn-blue"  data-toggle="doajax" data-confirm-msg="确定要粘贴分类-文章吗？"  data-idname="ids" data-group="ids">粘贴</a>

                <div class="btn-group">
                    <button type="button" class="btn-default dropdown-toggle" data-toggle="dropdown" data-icon="copy">
                        复选框-批量操作
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu right" role="menu">
                        <li>
                            <a href="{:U('copy')}" data-toggle="doajaxchecked" data-confirm-msg="确定要复杂选中项吗？"
                               data-idname="ids" data-group="ids">复制选中</a>
                            <a href="{:U('move')}" data-toggle="doajaxchecked" data-confirm-msg="确定要移动选中项吗？"
                               data-idname="ids" data-group="ids">移动选中</a>
                            <a href="{:U('setstatus?status=-1')}" data-toggle="doajaxchecked" data-confirm-msg="确定要删除选中项吗？"
                               data-idname="ids" data-group="ids">删除选中</a>
                        </li>
                    </ul>
                </div>
            </div>
        </form>
    </div>
</block>
<block name="pageContent">
    <div class="bjui-pageContent tableContent">
        <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
            <thead>
            <tr>
                <th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
                <th>
                    编号
                </th>
                <th>
                    标题
                </th>
                <th>
                    创建时间
                </th>
                <th>
                    数据状态
                </th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <volist name="articleList" id="vo">
                <tr data-id="{$vo.id}">
                    <td>
                        <input type="checkbox" name="ids" data-toggle="icheck" value="{$vo.id}">
                    </td>
                    <td>
                        {$vo.id}
                    </td>
                    <td>
                        {$vo.title}
                    </td>
                    <td>
                        {$vo.create_time|time_format}
                    </td>
                    <td>
                        {$vo.status|columnToName="DEFAULE_STATUS",###}
                    </td>
                    <td>
                        <a href="{:U('edit?id='.$vo['id'].'&model_id='.$vo['model_id'].'&navTabId=Article'.$vo['id'])}"
                           data-id="Article{$vo.id}" class="btn btn-blue" data-toggle="navtab"
                           data-title="{$vo.title}编辑">编辑</a>
                        <a href="{:U('setstatus?status=-1&ids='.$vo['id'])}" class="btn btn-red"
                           data-toggle="doajax">删除</a>
                        <if condition="session('push_user_id')">
                            <a href="{:U('user/wechatPush?article_id='.$vo['id'])}" class="btn btn-red" data-toggle="doajax">精准推送文章</a>
                        </if>
                        <a href="{:U('user/wechatPushAll?article_id='.$vo['id'])}" class="btn btn-red" data-toggle="doajax">一键推送文章</a>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
    </div>
</block>
